// import * as user from './user'
// import * as store from './store'


// export default {
//     ...user,
//     ...store
// }

// 排除掉 ./index.js

let files = require.context('./',false,/\.\/((?!index).)+\.js$/);

console.log("=====",files.keys()) //["./store.js", "./user.js", "./word.js"]

//files(path)  返回的是一个es6的模块

export default files.keys().reduce((prev,path) => {
    console.log(files(path))
    return Object.assign({},prev,files(path))
},{})

